from abc import ABC, abstractmethod
from typing import Optional, Dict, Any
#接口类：子模块基类
#提供子模块的标准接口，包括开启、退出、最小化和指令+参数功能。

class SubmoduleBase(ABC):
    def __init__(self, name: str, description: str = ""):
        self.name = name
        self.description = description
        self.is_running = False
        
    @abstractmethod
    def start(self) -> bool:
        pass
    
    @abstractmethod
    def stop(self) -> bool:
        pass
    
    @abstractmethod
    def minimize(self) -> bool:
        pass
    
    @abstractmethod
    def execute_command(self, command: str, params: Optional[Dict[str, Any]] = None) -> bool:
        pass